package 集合.泛型;

public class demo {
    public static void main(String[] args) {
        Cat<String , Integer> objectObjectCat = new Cat<>();
        objectObjectCat.flay(1,2);
        objectObjectCat.run("",90);
    }
}
//泛型类
class Cat <M,N>{
    public Cat(){}

    //泛型方法
    public <T, R> void flay(T t, R r){
        System.out.println(t);
        System.out.println(r);
    }
    //方法使用了类的泛型
    public void run(M m,N n){
        System.out.println(m.getClass());
    }
}